package com.iplatform.module.sys;

import com.iplatform.module.annotation.KeyId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author redho
 */
@Data
@ApiModel()
public class SysDataBean {

    @KeyId
    @ApiModelProperty(value = "数据字典ID", dataType = "String")
    private String dataId;

    @ApiModelProperty(value = "数据类型代码", dataType = "String", required = true)
    @NotBlank(message = "数据类型代码不能为空")
    private String typeCode;

    @ApiModelProperty(value = "数据类型名称", dataType = "String", required = true)
    @NotBlank(message = "数据类型名称不能为空")
    private String typeName;

    @ApiModelProperty(value = "数据代码(该字段也可存颜色的值)", dataType = "String", required = true)
    @NotBlank(message = "数据代码不能为空")
    private String code;

    @ApiModelProperty(value = "数据名称", dataType = "String", required = true)
    @NotBlank(message = "数据名称不能为空")
    private String name;

    @ApiModelProperty(value = "是否系统类型", hidden = true)
    private Boolean isSysDate;

    @ApiModelProperty(value = "备注")
    private String remark;

    @NotNull(message = "删除标识不能为空")
    private String isDeleted;

    @ApiModelProperty(value = "版本号", hidden = true, example = "1")
    private BigDecimal version;

    @ApiModelProperty(value = "排序码")
    private Integer sortNum;

    @ApiModelProperty(value = "更新时间", hidden = true)
    private Date updatedDt;

    @ApiModelProperty(value = "更新人", hidden = true)
    private String updatedBy;

    @ApiModelProperty(value = "创建时间", hidden = true)
    private Date createdDt;

    @ApiModelProperty(value = "创建人", hidden = true)
    private String createdBy;

    @ApiModelProperty(value = "数据类型状态,0为系统，1为功能")
    private String dataType;

    @ApiModelProperty(value = "数据描述")
    private String description;

    @ApiModelProperty(value = "排序码")
    private BigDecimal ordNo;

    @ApiModelProperty(value = "类型排序码")
    private BigDecimal typeOrdNo;

    @ApiModelProperty(value = "是否只读")
    private String isReadOnly;

    @ApiModelProperty(value = "图标", dataType = "String")
    private String icon;
}
